package com.yang.concurrency.chapter3;

/**
 * @Author: 血魔
 * @Date: Created in 14:18 2021/12/12
 * @Version: 1.0$
 */
public class CreateThread03 {
    static int counter;
    public static void main(String[] args) {
        try {
            add(0);
        } catch (Error e) {
            e.printStackTrace();
            System.out.println(counter);
        }
    }

    private static void add(int i) {
        ++counter;
        add(i+1);
    }
}
